<?php

class gViewArea extends gCoreObject
{
	protected $_data = array('errors'=>array(),'messages'=>array());
	
	function __set($key,$value)
	{
		$this->_data[$key] = $value;
	}
	
	function __get($key)
	{
		return	array_key_exists($key, $this->_data) ? $this->_data[$key] : null;
	}
	
	public function error($message)
	{
		$this->_data['errors'][] = $message;
	}
	
	public function message($message)
	{
		$this->_data['messages'][] = $message;
	}
}